////////////////////////////////////////////////////////////////////////////////
// Filename: L_d3dx11model.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _L_D3DX11MODEL_H_
#define _L_D3DX11MODEL_H_

#include "L_math.h"
#include "L_objdata.h"
#include <d3dx11.h>
#include <string>
using namespace std;

struct S_ModelVertex
{
	float3 pos;
	float2 uv;
};

class L_D3DX11Model
{
	ID3D11Device* Device;

	ID3D11Buffer* VertexBuffer;

	S_ModelVertex* vertices;
	unsigned int NumVertices;

public:
	L_D3DX11Model();
	~L_D3DX11Model();

	bool SetDevice(ID3D11Device* tDevice);
	bool LoadFromFile(string FileName);
	bool InitBuffer();

	ID3D11Buffer* GetVertexBuffer();

	unsigned int GetNumVertices();
};

#endif